﻿using HCQ2WebAPI_Logic.BaseAPIController;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Web.Http;
using HCQ2_Model.ViewModel.WebAPI;
using HCQ2WebAPI_Logic.Model;
using HCQ2_Common.Constant;
using HCQ2_Model.VRDevice.ParamModel;
using HCQ2_Model.VRDevice.ResultModel;

namespace HCQ2WebAPI_Logic.DocumentController
{
    /// <summary>
    ///  VR设备相关接口
    /// </summary>
    public class VRDeviceAPIController : BaseWeiXinApiLogic
    {
        //****************************************************1.0 VR设备接口*******************************************************
        #region ✔1.0 获取授权用户 + WebApiResultJsonModel GetAuthorUser(AuthorUser model)
        /// <summary>
        ///  获取授权用户
        /// </summary>
        /// <param name="model">参数</param>
        /// <returns></returns>
        [HttpPost]
        public async Task<WebApiResultJsonModel> GetAuthorUser(AuthorUser model)
        {
            if (!ModelState.IsValid)
                return ApiResultJsonModel.RedirectWebApi(WebResultCode.Exception, getErrorMessage(ModelState), null);
            List<AuthorUserResult> list = await operateContext.bllSession.T_DocEmpower.GetAuthorUser(model);
            return ApiResultJsonModel.RedirectWebApi(WebResultCode.Ok, "成功获取授权用户~", list);
        }
        #endregion
    }
}